import request from '@/utils/request'

/**
 * @description 用户登录
 * @param {*} data 账号密码对象
 * @returns Promise
 */
export function login(data) {
  return request({
    method: 'POST',
    url: '/sys/login',
    data
  })
}
/**
 * @description 获取用户基本资料
 * @returns Promise
 */
export function getProfile() {
  return request({
    method: 'POST',
    url: '/sys/profile'
  })
}
/**
 * @description 获取员工基本信息
 * @param {id} 用户userId
 * @returns Promise
 */
export function getDetailById(id) {
  return request({
    method: 'GET',
    url: `/sys/user/${id}`
  })
}

export function getInfo(token) {

}

export function logout() {

}
